<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::get('/', 'HomeController@index');

Route::get('/at-admin', 'AdminController@index');

Route::get('at-admin/user', 'AdminUserController@index');

//Route::get('profile', array('before' => 'auth', function()
//{
//    // Only authenticated users may enter...
//}));

Route::get('at-admin/user/update/{id}', 'AdminUserController@form');
Route::post('at-admin/user/update/{id}', 'AdminUserController@update');

Route::get('at-admin/user/register', 'AdminUserController@form');
Route::post('at-admin/user/register', 'AdminUserController@create');

Route::get('at-admin/user/login', 'AdminSessionController@login');
Route::post('at-admin/user/login', 'AdminSessionController@postSignin');

Route::get('at-admin/user/logout', 'AdminUserController@logout');
Route::get('at-admin/user/trash/{id}', 'AdminUserController@trash');
Route::get('at-admin/user/trashs/{trash}', 'AdminUserController@index');
Route::get('at-admin/user/restore/{id}', 'AdminUserController@restore');

Route::get('forgot-password', 'RemindersController@getRemind');
Route::post('forgot-password', 'RemindersController@postRemind');

Route::get('password/reset/{token}', 'RemindersController@getReset');
Route::post('password/reset/{token}', 'RemindersController@postReset');
